<script setup>
import {ref} from "vue";
import {useRouter} from "vue-router";

//默认是首页
const active = ref("index")
const router = useRouter();
const onClickLeft = () => {
  router.back();
};

const onClickRight = () => {
  router.push('/search')
};
</script>

<template>
  <van-nav-bar title="友你" left-text="返回" left-arrow @click-left="onClickLeft"
               @click-right="onClickRight" fixed=true>
    <template #right   >
      <van-icon name="search" size="18"/>
    </template>
  </van-nav-bar>

  <div class="content">
    <router-view></router-view>
  </div>



  <van-tabbar route @change="onChange">
    <van-tabbar-item to="/" icon="home-o">首页</van-tabbar-item>
    <van-tabbar-item to="/team" icon="search">队伍</van-tabbar-item>
    <van-tabbar-item to="/my" icon="friends-o">我</van-tabbar-item>
  </van-tabbar>
</template>

<style scoped>
</style>
